import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
font_set = FontProperties(fname = r"C:\Windows\Fonts\simsun.ttc", size = 20)

dataX = [1,2,3,4]
dataY = [2,4,4,2]
plt.plot(dataX,dataY)
plt.title("绘制直线",fontproperties = font_set);
plt.xlabel("X轴",fontproperties = font_set);
plt.ylabel("Y轴",fontproperties = font_set);
plt.show()